#if !defined(RESOURCEINPUT_H)
#define RESOURCEINPUT_H

#include "resource.h"
#include <OIS.h>


namespace gunsmith
{
using namespace OIS;
/*! \class CResourceInput
	\brief Effect resource. */
class CResourceInput : public CResource, public OIS::KeyListener, public OIS::MouseListener, public OIS::JoyStickListener
{
public:
					CResourceInput		();
	virtual			~CResourceInput		();
	virtual bool	Create				(void* pSource);
	virtual void	Destroy				();
	Keyboard*		GetKeyboard			()				const;
	Mouse*			GetMouse			()				const;
	JoyStick*		GetJoyStick			()				const;
	// KeyListener callback functions
	virtual bool	keyPressed		(const KeyEvent &arg);
	virtual bool	keyReleased		(const KeyEvent &arg);
	// MouseListener callback functions
	virtual bool	mouseMoved		(const MouseEvent &arg);
	virtual bool	mousePressed	(const MouseEvent &arg, MouseButtonID id);
	virtual bool	mouseReleased	(const MouseEvent &arg, MouseButtonID id);
	// JoyStickListener callback functions
	virtual bool	buttonPressed	(const JoyStickEvent &arg, int button);
	virtual bool	buttonReleased	(const JoyStickEvent &arg, int button);
	virtual bool	axisMoved		(const JoyStickEvent &arg, int axis);

private:
	void	GetInputDevices	();

	static InputManager*	m_pInputManager;
	static DeviceList		m_xDevices;
	Keyboard*				m_pKeyboard;
	Mouse*					m_pMouse;
	JoyStick*				m_pJoyStick;
};
};

#endif //RESOURCEINPUT_H